<?php
require('db.php');

$result = mysql_query("select id, naam from functie") or die (mysql_error());

$data = array();

while ($row = mysql_fetch_object($result)) {
    $data [] = $row;
}

echo json_encode($data);
?>
